'''
Created on 2010-10-20

@author: DouglasWin7
'''
from decimal import Decimal as dec

class equal_repayment_of_principal:
    @staticmethod
    def get_list(amount,monthcount,currentrate):
        list=[]
        lastamount = amount       
        averageamount = round((float(amount)/monthcount),2)
        i=0
        while i<= monthcount:
            paymonth = round(lastamount*currentrate/12 + averageamount,2)
            lastamount -= averageamount
            i += 1
            m = i.__str__() + " month :" + paymonth.__str__()
            #print m
            list.append(m)
        return list
  
#equal_repayment_of_principal.get_list(340000, 240, 0.04158)